package cn.itrip.dao;

import cn.itrip.pojo.ItripComment;
import cn.itrip.vo.comment.ItripListCommentVO;
import cn.itrip.vo.comment.ItripScoreCommentVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ItripCommentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ItripComment record);

    int insertSelective(ItripComment record);

    ItripComment selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ItripComment record);

    int updateByPrimaryKeyWithBLOBs(ItripComment record);

    int updateByPrimaryKey(ItripComment record);

    /**
     * 根据酒店id查询 评分类
     * @param hotelId
     * @return
     */
    ItripScoreCommentVO selectByGrade(@Param("hotelId") Long hotelId);

    /**
     * 根据条件查询评论数量
     * @param map
     * @return
     */
    Integer selectByMap(Map map);

    /**
     * 查询vocabulary列表
     * @param map
     * @return
     */
    List<ItripListCommentVO> selectByCommentVoList(Map map);
}